package com.zkthink.ceres.product.dao;

import com.zkthink.base.mapper.SuperMapper;
import com.zkthink.ceres.product.entity.SearchHistory;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 搜索历史表
 * </p>
 *
 * @author JustArgo
 * @date 2020-05-31
 */
@Repository
public interface SearchHistoryMapper extends SuperMapper<SearchHistory> {

    /** 查找最近的n条搜索历史记录
     * @author JustArgo 2020/5/31 12:46
     * @return
     */
    List<SearchHistory> findLastNSearchHistory(@Param("mid")Long mid, @Param("nCount")int nCount);

    /** 删除搜索历史
     * @author JustArgo 2020/5/31 13:02
     * @return
     */
    int delSearchHistory(@Param("mid")Long mid, @Param("keyword")String keyword);
}
